package com.zzh.zzhaiagent.utils;

import lombok.Getter;

/**
 * @author 张 志 豪
 * @version 1.0
 */
@Getter
public enum ResultCodeEnum {
    SUCCESS(200,"成功"),
    FAIL(201,"失败"),
    LOGIN_SUCCESS(202,"登录成功"),
    REFRESH_TOKEN_SUCCESS(209,"token刷新"),
    SERVICE_ERROR(2012,"服务异常"),
    DATA_ERROR(204,"数据异常"),
    ILLEGAL_REQUEST(205,"非法请求"),
    REPEAT_SUBMIT(206,"重复提交"),
    LOGIN_AUTH(208,"未登陆"),
    FORM_DATA_ERROR(40001,"表单数据参数异常"),
    EXIST_USER(40002,"账户已存在"),
    SYSTEM_ERROR(40003,"系统出错"),
    PARAMS_ERROR(40004,"参数异常"),
    NO_AUTH(40005,"无权限"),
    EMAIL_NOT_EXIST(40006, "邮箱不存在"),
    CODE_ERROR(40007, "验证码错误"),
    ACCOUNT_NOT_EXIST(40008, "账户不存在"),
    PASSWORD_ERROR(40009, "密码错误"),
    //密码重复错误
    PASSWORD_REPEAT_ERROR(40011, "密码重复错误"),
    TOKEN_COUNT_OUT_OF_LIMIT(40010, "token数量超出限制,请再次申请token数"),
    TOO_MANY_REQUESTS(40012, "请求过于频繁");

    private Integer code;
    private String message;
    private ResultCodeEnum(Integer code, String message){
        this.code = code;
        this.message = message;
    }
}
